package de.slothsoft.commons.swing;

import java.awt.Insets;

import javax.swing.Icon;
import javax.swing.JButton;

public class SwingUtil {

    // TODO: merge with ControlUtil

    private static final Insets margins = new Insets(0, 0, 0, 0);

    /**
     * Creates a button for a toolbar (e.g. without margins)
     * 
     * @return
     */

    public static JButton createToolBarButton(Icon icon, String toolTip) {
	JButton result = new JButton(icon);
	result.setMargin(margins);
	result.setToolTipText(toolTip);
	return result;
    }

}
